import React, { useState, createContext } from 'react'

// import Time from './views/Hooks/useCount/Time'
import Father from './views/Hooks/Context/Father'
// class App extends React.Component {
//   render() {
//     return (
//       <div>
//         御剑乘风来,除魔天地间!===App
//         <button onClick={()=>}>app=color</button>
//         <hr />
//         <Father></Father>
//       </div>
//     )
//   }
// }
// export default App
export const Context = createContext()
const App = () => {
  const [color, setColor] = useState('red')
  console.log(Context, 44)
  return (
    <Context.Provider value={color}>
      御剑乘风来,除魔天地间!===App===color:{color}===
      <button onClick={() => setColor('green')}>app=color</button>
      <hr />
      <Father></Father>
    </Context.Provider>
  )
}
export default App
